package com.guli.mall.vo;
/*
 * @Author 罗
 * @date 2020/10/13 - 7:10 下午
 */

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.elasticsearch.search.sort.SortOrder;

import java.util.List;
import java.util.Map;

/**
 * 用于封装搜索条件
 */
@Data
public class SearchParamsVo {

    /**
     * 三级分类id
     */
    private Integer catalog3Id;

    /**
     * 要搜索的关键字
     */
    private String keyword;

    /**
     * 是否只显示有货
     */
    private Boolean hasStock;

    /**
     * 价格区间
     */
    private Integer maxPrice;

    private Integer minPrice;

    /**
     * 品牌
     */
    private List<String> brandIds;

    /**
     * 按照属性的值进行筛选
     * key:属性id
     * value：属性的值
     */
    private List<Attr> attrMap;

    /**
     * 当前页
     */
    private Integer currentPage;

    /**
     * 每页记录数
     * */
    private Integer size;

    /**
     * 排序条件
     * saleCount_asc
     * saleCount_desc
     * skuPrice_asc
     * skuPrice_desc
     * hotScore_asc
     * hotScore_desc
     */
    @ApiModelProperty(allowableValues = "saleCount_asc,saleCount_desc,skuPrice_asc,skuPrice_desc,hotScore_asc,hotScore_desc")
    private String sortCondition;

    @Data
    public static class Attr{
        private Integer attrId;
        private List<String> attrValues;
    }

}
